-
Notifications
You must be signed in to change notification settings - Fork 7
Fix CosmoTimeBasedWeatherValueFactoryTest #1470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
To reviewer: It looks to me like when testing |
|
@staudtMarius: After reflecting our discussion I prefer to have two separate checks of time and values instead of |
staudtMarius
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this issue. I have some small remarks.
.../groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
.../groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
sebastian-peter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielfeismann This is very, very annoying. Apparently, groovy calls org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation#compareToWithEqualityCheck when invoking ==, and this in turn calls compareTo if the two objects implement Comparable.
A secondary problem is, that apparently we don't have consistent implementations of equals and compareTo methods (see also the documentation).
So, your current solution of comparing the fields of objects is the best we can do, imho, given Intellij's prevalence of suggesting replacements of equals with ==.
|
After a short talk with @sebastian-peter, the best way would be to use |
resolves #1469
merge first